package com.atguigu.service.impl;

import com.atguigu.dao.UserDao;
import com.atguigu.dao.impl.UserDaoImpl;
import com.atguigu.pojo.User;
import com.atguigu.service.UserService;

/**
 * @version 1.0
 * @Author 马冰
 * @Date 2024/12/11 14:05
 * @注释 调用数据访问层
 */
public class UserServiceImpl implements UserService {
    @Override
    public User findUserByName(String username) {
        UserDao userDao = new UserDaoImpl();
        User user = userDao.selectUserByName(username);
        return user;
    }

    @Override
    public void updatePasswordByid(Integer id, String password) {
        UserDao userDao = new UserDaoImpl();
        userDao.updatePasswordById(id,password);
    }
}
